package com.itheima.service;

import com.itheima.common.pojo.Employee;
import com.itheima.common.result.PageInfo;
import com.itheima.common.vo.EmployeeVO;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author liguoping
 */
@Transactional
public interface EmployeeService {
    /**
     * 员工登陆
     * @param username
     * @param password
     * @return
     */
    EmployeeVO login(String username, String password);
    /**
     * 清除token
     * @param token
     */
    void clearToken(String token);
    /**
     * 根据员工id找员工
     * @param id
     * @return
     */
    EmployeeVO getById(String id);
    /**
     * 新增员工
     * @param employee
     * @return
     */
    boolean save(Employee employee);
    /**
     * 分页查询
     * @param name
     * @param page
     * @param pageSize
     * @return
     */
    PageInfo<Employee> page(String name, Integer page, Integer pageSize);

    boolean updateEmployee(Employee employee);
}
